package com.xbongbong.paas.pojo.dto;

import com.xbongbong.paas.pojo.LeadOrFrePojo;
import com.xbongbong.paas.pojo.RuleSavePojo;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author long
 * @version v1.0
 * @date 2020/12/1 9:36
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class ClueRuleSaveDTO extends BaseDTO {

    /**
     * 公海规则是否启用
     */
    @NotNull(message = "{dto.msg.clueRuleSave.status.NotNull}")
    @DecimalMin(value = "0", message = "{dto.msg.clueRuleSave.status.DecimalMin}")
    @DecimalMax(value = "1", message = "{dto.msg.clueRuleSave.status.DecimalMax}")
    private Integer status;
    /**
     * 公海规则类型
     * 1.无新建跟进规则2.最大拥有线索数3.前负责人规则4.捞取频次限制5.自动分配规则
     */
    @NotNull(message = "{dto.msg.clueRuleSave.ruleType.NotNull}")
    @Range(min = 1, max = 6, message = "{dto.msg.clueRuleSave.ruleType.Range}")
    private Integer ruleType;
    /**
     * 公海规则:1.拜访时间2.有无机会3.有无合同4.总数限制
     */
    private RuleSavePojo ruleValue;

    /**
     * 公海规则:5.前负责人规则6.捞取频次限制
     */
    private List<LeadOrFrePojo> leadOrFre;
}
